package com.chao.kafka.consumer;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class KafkaConsumer {

    @KafkaListener(topics = {"test"},groupId = "123")
    public void consume(String msg) {
        System.out.println("接收到消息" + msg);
    }
}
